<template>
<div><slot name="title"></slot>
  <table class="table table-bordered table-stripped">
    <!-- 表格标题区域 -->

    <thead>
      <tr>
        <th>id</th>
        <th>商品名称</th>
        <th>价格</th>
        <th>创建时间</th>
        <th>操作</th>
      </tr>
    </thead>
    <!-- 表格主体区域 -->
    <tbody>
        <tr v-for="obj in list" :key="obj.id">
          <td>
            <slot :id="obj.id" name="id"></slot>
          </td>
          <td>
            <slot :uname="obj.name" name="uname"></slot>
          </td>
          <td>
            <slot :price="obj.price" name="price"></slot>
          </td>
          <td>
            <slot :time="obj.time" name="times"></slot>
          </td>
          <td>
            <slot  name="btn"></slot>
          </td>
        </tr>
    </tbody>
  </table></div>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      required: true
    }
  }
}
</script>

<style>

</style>
